<!--
 * @Autor: 黄旗
 * @Date: 2020-06-02 17:47:27
-->
<template>
<Card>
    <div class="portList">
        <Tabs v-model="oldList" @on-click="tabCustom(oldList)">
            <!-- <TabPane label="经营报表" name="1">
                <div class="backs">
                    <table-list ref="management-list"></table-list>
                </div>
            </TabPane> -->
            <!--            <TabPane label="消费报表" name="2">-->
            <!--                <div class="backs">-->
            <!--                    <consumption></consumption>-->
            <!--                </div>-->
            <!--            </TabPane>-->

            <TabPane label="患者预览表" name="3">
                <div class="backs">
                    <report-tab ref="reportTable"></report-tab>
                </div>
            </TabPane>
            <TabPane label="完善度报表" name="4">
                <div class="backs">
                    <wanshandulist ref="wanshandulist"></wanshandulist>
                </div>
            </TabPane>
        </Tabs>
    </div>
</Card>
</template>

<script>
    // import TableList from './modules/table-list'
    // import Consumption from '../consumption'
    import ReportTab from '../reportTab'
    import wanshandulist from './modules/wanshandulist'
    export default {
        name: 'management',
        components: {
            // TableList,
            // Consumption,
            ReportTab,
            wanshandulist
        },
        data () {
            return {
                oldList: '3'
            }
        },
        methods: {
            tabCustom (name) {
                if (name === '3') {
                    this.$refs.reportTable.onLoad()
                } else if (name === '4') {
                    this.$refs.wanshandulist.askDatas()
                }
            }
        },
        mounted () {
            this.$refs.reportTable.onLoad()
        }
    }
</script>

<style scoped lang="less">
    .portList /deep/.ivu-tabs-bar {
        margin-bottom: 0;
    }

    .backs {
        background-color: #fff;
        padding: 16px;
    }

    .portList /deep/.ivu-table th {
        background-color: #f8f8f9;
    }

    .portList /deep/.ivu-tabs {
        overflow: visible;
    }
</style>
